#pragma once
#include <boost/asio.hpp>
#include "io_service_pool.h"
#include "ServerSession.h"

using namespace boost;
using namespace boost::asio;

class CServer
{
public:
	CServer(short port, int thread_cnt);
	~CServer();

	void handle_accept(CServerSession* pSession, const boost::system::error_code& err);

	void run();

private:
	io_service_pool					m_io_service_pool;
	ip::tcp::acceptor				m_acceptor;
};

